import { Injectable } from '@angular/core';
import { Observable, Subject } from 'rxjs';
import { CoreModule } from '../core.module';
import { LayoutRourteStatus } from 'src/app/model/status';
import { FormControl } from '@angular/forms';

@Injectable({
    providedIn: CoreModule
})
export class MessageService {
    private subject = new Subject<any>();
    constructor(
    ) { }

    sendMessage(message: string) {
        this.subject.next({ text: message });
    }

    sendLayoutRourteStatus(layoutRourteStatus: LayoutRourteStatus) {
        this.subject.next(layoutRourteStatus);
    }

    MY_SEND_DATA(message: string, data: any) {
        this.subject.next({ text: message, data: data });
    }

    clearMessage() {
        if (this.subject.observers.length > 2) {
            for (let i = 0; i < this.subject.observers.length - 2; i++) {
                this.subject.observers.splice(i, 1);
            }
        }
    }

    getMessage(): Observable<any> {
        return this.subject.asObservable();
    }

    colseCollapse(): Observable<any> {
        return this.subject.asObservable();
    }

    closeModal(): Observable<any> {
        return this.subject.asObservable();
    }
}

/**
 * 医生查询患者（无异常药品 正常流程
 */
export const HUAN_ZHE_A: Array<any> = [
    {
        ks: '消化内科', lx: '自费', ycfhm: "02034384239472039477", kfsj: '2019-06-04 19:12:33', jzkh: '20120000002848', cfhm: '15010912791', ys: '张怡婷', hzxm: '车旭', zt: '未审核',
        mzh: 'P01503031', jzzt: '初诊', nl: 37, sex: '男', phone: '13262747340', zdmc: '慢性胃炎', bqms: '肠胃系乱', yiyuan: '重庆医科大学附属第二医院',qydz:'华氏大药房',
        list: [
            { bh: '203', ypbm: '080112343', mc: '雷贝拉唑钠片', gg: '每次20mg，2次/日', bzgg: '20mg*7片/盒', scqy: '成都迪康制药公司', kfsl: '3', isJy: '可流转', bhyy: '-', yf: '口服' },
            { bh: '203', ypbm: '080112343', mc: '胶体酒石酸铋胶囊', gg: '每次165mg，4次/日', bzgg: '55mg*24粒/盒', scqy: '山西星火维敏制药有限公司', kfsl: '4', isJy: '可流转', bhyy: '-', yf: '口服' },
            { bh: '203', ypbm: '080112343', mc: '枸枸橼酸莫沙比利片', gg: '每次5mg，3次/日', bzgg: '5mg*10片/盒', scqy: '亚宝药业集团股份有限公司', kfsl: '3', isJy: '可流转', bhyy: '-', yf: '口服' },
            { bh: '203', ypbm: '080112343', mc: '克拉霉素缓释片', gg: '每次0.5g，2次/日', bzgg: '0.5g*7片/盒', scqy: '海南普利制药股份有限公司', kfsl: '3', isJy: '可流转', bhyy: '-', yf: '口服' },
        ]
    }];
/**
 * 医生查询患者（有异常药品）不可提交处方
 */
export const HUAN_ZHE_B: Array<any> = [
    {
        ks: '脊柱外科', lx: '医保', ycfhm: '02034384239472039477', kfsj: '2019-06-04 09:12:33', jzkh: '20180000006193', cfhm: '0088342345', ys: '苏震', hzxm: '曹阳', zt: '未审核',
        mzh: 'P34016205', jzzt: '初诊', nl: 25, sex: '男', phone: '13262747340', zdmc: '骨关节炎', bqms: '头痛，呕吐', yiyuan: '重庆医科大学附属第二医院',
        list: [
            { bh: '203', ypbm: '080112343', mc: '塞来昔布胶囊', gg: '每次0.2g，1次/日', bzgg: '0.2g*6粒/盒', scqy: '辉瑞制药有限公司', kfsl: '5', isJy: '不可流转', bhyy: '根据卫健委的处方流转要求，该药品属于特殊高危类药品，暂不纳入电子处方流转范围。' },
            { bh: '203', ypbm: '080112343', mc: '阿奇霉素片', gg: '每次0.5g，1次/日', bzgg: '0.25g*6片/盒', scqy: '辉瑞制药有限公司', kfsl: '3', isJy: '可流转', bhyy: '-' }
        ]
    }
];
/**
 * 医生查询患者（有异常药品）被药师驳回
 */
export const HUAN_ZHE_C: Array<any> = [
    {
        ks: '神经内科', lx: '自费', ycfhm: "098812323423377", kfsj: '2019-06-04 19:12:33', jzkh: '20120000019187', cfhm: '10010912792', ys: '张怡婷', hzxm: '陈佈月', zt: '未审核',
        mzh: 'P01286890', jzzt: '初诊', nl: 56, sex: '女', phone: '18221890929', zdmc: '高血压', bqms: '眩晕', yiyuan: '重庆医科大学附属第二医院', fxyy: true,
        list: [
            {
                bh: '203', ypbm: '080112343', mc: '胞磷胆碱钠片', gg: '每次0.2g，1次/日', bzgg: '0.2g*12片/盒', scqy: '华润双鹤利民药业(济南)有限公司', kfsl: '3', isJy: '可流转', yf: '口服',
                bhyy: '药理性配伍禁忌', fxyy: true
            },
            { bh: '203', ypbm: '080112343', mc: '拜阿司匹林肠溶片', gg: '每次25mg，2次/日', bzgg: '25mg*20/盒', scqy: '阿斯利康制药有限公司', kfsl: '1', isJy: '可流转', bhyy: '-', yf: '口服' },
            { bh: '203', ypbm: '080112343', mc: '酒石酸美托洛尔', gg: '每次0.1g，1次/日', bzgg: '0.1g*30片/盒', scqy: '拜耳医药保健有限公司', kfsl: '1', isJy: '可流转', yf: '口服' ,
                bhyy: '药理性配伍禁忌', fxyy: true
            },
            { bh: '203', ypbm: '080112343', mc: '苯硫酸氨氯地平片', gg: '每次5mg，1次/日', bzgg: '5mg*7片/盒', scqy: '苏州东瑞制药有限公司', kfsl: '4', isJy: '可流转', bhyy: '-', yf: '口服' },
        ]
    }];
/**
 * 已审列表
 */
export const HUAN_ZHE_LIST: Array<any> = [
    {
        ks: '消化内科', lx: '自费', ycfhm: "02034384239472039477", kfsj: '2019-06-04 19:12:33', jzkh: '20120000002848', cfhm: '15010912791', ys: '张怡婷', hzxm: '车旭', zt: '通过', sfr: '陈亮',
        mzh: 'P01503031', jzzt: '初诊', nl: 37, sex: '男', phone: '13262747340', zdmc: '慢性胃炎', bqms: '肠胃系乱', yiyuan: '重庆医科大学附属第二医院', sfsj: '2019-06-04 20:12:33',
        list: [
            { bh: '203', ypbm: '080112343', mc: '雷贝拉唑钠片', gg: '每次20mg，2次/日', bzgg: '20mg*7片/盒', scqy: '成都迪康制药公司', kfsl: '3', isJy: '可流转', bhyy: '-', yf: '口服' },
            { bh: '203', ypbm: '080112343', mc: '胶体酒石酸铋胶囊', gg: '每次165mg，4次/日', bzgg: '55mg*24粒/盒', scqy: '山西星火维敏制药有限公司', kfsl: '4', isJy: '可流转', bhyy: '-', yf: '口服' },
            { bh: '203', ypbm: '080112343', mc: '枸枸橼酸莫沙比利片', gg: '每次5mg，3次/日', bzgg: '5mg*10片/盒', scqy: '亚宝药业集团股份有限公司', kfsl: '3', isJy: '可流转', bhyy: '-', yf: '口服' },
            { bh: '203', ypbm: '080112343', mc: '克拉霉素缓释片', gg: '每次0.5g，2次/日', bzgg: '0.5g*7片/盒', scqy: '海南普利制药股份有限公司', kfsl: '3', isJy: '可流转', bhyy: '-', yf: '口服' },
        ]
    }, {
        ks: '神经内科', lx: '自费', ycfhm: "098812323423377", kfsj: '2019-06-04 19:12:33', jzkh: '20120000019187', cfhm: '15010912791', ys: '张怡婷', hzxm: '陈佈月', zt: '被驳回', sfr: '陈亮',
        mzh: 'P01286890', jzzt: '初诊', nl: 56, sex: '女', phone: '18221890929', zdmc: '高血压', bqms: '眩晕', yiyuan: '重庆医科大学附属第二医院', beizhu: '无', sfsj: '2019-06-04 20:12:33', fxyy: true,
        list: [
            {
                bh: '203', ypbm: '080112343', mc: '胞磷胆碱钠片', gg: '每次0.2g，1次/日', bzgg: '0.2g*12片/盒', scqy: '华润双鹤利民药业(济南)有限公司', kfsl: '3', isJy: '可流转', yf: '口服',
                bhyy: '药理性配伍禁忌', fxyy: true
            },
            { bh: '203', ypbm: '080112343', mc: '拜阿司匹林肠溶片', gg: '每次25mg，2次/日', bzgg: '25mg*20/盒', scqy: '阿斯利康制药有限公司', kfsl: '1', isJy: '可流转', bhyy: '-', yf: '口服' },
            { bh: '203', ypbm: '080112343', mc: '枸枸橼酸莫沙比利片', gg: '每次0.1g，1次/日', bzgg: '0.1g*30片/盒', scqy: '拜耳医药保健有限公司', kfsl: '1', isJy: '可流转', bhyy: '-', yf: '口服' },
            { bh: '203', ypbm: '080112343', mc: '苯硫酸氨氯地平片', gg: '每次5mg，1次/日', bzgg: '5mg*7片/盒', scqy: '苏州东瑞制药有限公司', kfsl: '4', isJy: '可流转', bhyy: '-', yf: '口服' },
        ]

    },
    { ks: '神经外科', lx: '医保', ycfhm: "02034384239472039477", kfsj: '2019-05-20 10:12:33', sfsj: '2019-05-20 10:12:33', jzkh: '981112343', cfhm: '5488342345', ys: '蔡秀婷', sfr: '陈亮', hzxm: '魏维', zt: '通过', mzh: '00089173', jzzt: '初诊' },
    { ks: '创伤骨外科', lx: '医保', ycfhm: "02034384239472039432", kfsj: '2019-05-20 10:12:33', sfsj: '2019-05-20 10:12:33', jzkh: '981452345', cfhm: '3245342345', ys: '张部', sfr: '张叶', hzxm: '张可', zt: '驳回', mzh: '00089173', jzzt: '初诊' },
    { ks: '肝胆外科', lx: '自费', ycfhm: "02034384239472036777543", kfsj: '2019-05-19 10:12:33', sfsj: '2019-05-20 10:12:33', jzkh: '2345343', cfhm: '425435657', ys: '江琳达', hzxm: '张佳胤', sfr: '张叶', zt: '驳回', mzh: '00089173', jzzt: '初诊' },
    { ks: '胸外科', lx: '医保', ycfhm: "02034384239472039477", kfsj: '2019-05-20 10:12:33', sfsj: '2019-05-20 10:12:33', jzkh: '981112343', cfhm: '5488342345', ys: '李华', hzxm: '魏鞅', sfr: '陈亮', zt: '通过', mzh: '00089173', jzzt: '初诊' },
    { ks: '关节外科', lx: '医保', ycfhm: "02034384239472039432", kfsj: '2019-05-20 10:12:33', sfsj: '2019-05-20 10:12:33', jzkh: '981452345', cfhm: '3245342345', ys: '杨素', hzxm: '张可', zt: '通过', sfr: '陈亮', mzh: '00089173', jzzt: '初诊' },
    { ks: '肛肠科', lx: '自费', ycfhm: "02034384239472036777543", kfsj: '2019-05-19 10:12:33', sfsj: '2019-05-20 10:12:33', jzkh: '2345343', cfhm: '425435657', ys: '韩莉', hzxm: '何一九', zt: '通过', sfr: '陈亮', mzh: '00089173', jzzt: '初诊' },
    { ks: '乳腺外科', lx: '医保', ycfhm: "02034384239472039477", kfsj: '2019-05-20 10:12:33', sfsj: '2019-05-20 10:12:33', jzkh: '981112343', cfhm: '5488342345', ys: '倪玉芳', hzxm: '陈禹涵', zt: '通过', sfr: '陈亮', mzh: '00089173', jzzt: '初诊' },
    { ks: '神经内科', lx: '医保', ycfhm: "02034384239472039432", kfsj: '2019-05-20 10:12:33', sfsj: '2019-05-20 10:12:33', jzkh: '981452345', cfhm: '3245342345', ys: '王晓青', hzxm: '张可', sfr: '张叶', zt: '通过', mzh: '00089173', jzzt: '复诊' },
    { ks: '呼吸内科', lx: '自费', ycfhm: "02034384239472036777543", kfsj: '2019-05-19 10:12:33', sfsj: '2019-05-20 10:12:33', jzkh: '2345343', cfhm: '425435657', ys: '吴辉', hzxm: '何其', sfr: '张叶', zt: '通过', mzh: '00089173', jzzt: '复诊' },
    { ks: '消化内科', lx: '医保', ycfhm: "02034384239472039477", kfsj: '2019-05-20 10:12:33', sfsj: '2019-05-20 10:12:33', jzkh: '981112343', cfhm: '5488342345', ys: '王可', hzxm: '汴杰军', sfr: '张叶', zt: '通过', mzh: '00089173', jzzt: '复诊' },
    { ks: '血液内科', lx: '医保', ycfhm: "02034384239472039432", kfsj: '2019-05-20 10:12:33', sfsj: '2019-05-20 10:12:33', jzkh: '981452345', cfhm: '3245342345', ys: '孙綝希', hzxm: '阮文宇', sfr: '张叶', zt: '驳回', mzh: '00089173', jzzt: '复诊' },
    { ks: '内分泌内科', lx: '自费', ycfhm: "02034384239472036777543", kfsj: '2019-05-19 10:12:33', sfsj: '2019-05-20 10:12:33', jzkh: '2345343', cfhm: '425435657', ys: '周冰', hzxm: '温泉', sfr: '张叶', zt: '通过', mzh: '00089173', jzzt: '复诊' },
    { ks: '风湿免疫科', lx: '医保', ycfhm: "02034384239472039477", kfsj: '2019-05-20 10:12:33', sfsj: '2019-05-20 10:12:33', jzkh: '981112343', cfhm: '5488342345', ys: '唐文佳', hzxm: '张慧芳', sfr: '陈亮', zt: '通过', mzh: '00089173', jzzt: '复诊' },
    { ks: '肾内科', lx: '医保', ycfhm: "02034384239472039432", kfsj: '2019-05-20 10:12:33', sfsj: '2019-05-20 10:12:33', jzkh: '981452345', cfhm: '3245342345', ys: '洪炯', hzxm: '张可', sfr: '陈亮', zt: '通过', mzh: '00089173', jzzt: '复诊' },
    { ks: '中医科', lx: '自费', ycfhm: "02034384239472036777543", kfsj: '2019-05-19 10:12:33', sfsj: '2019-05-20 10:12:33', jzkh: '2345343', cfhm: '425435657', ys: '胡永杰', hzxm: '舒琳', sfr: '陈亮', zt: '通过', mzh: '00089173', jzzt: '复诊' },
];

export const PHONE:string = '13482488115'